import java.util.HashSet;
import java.util.Set;

public class TwoPower {

    Set<String> tempSet=new HashSet<>();

    public boolean getPower(int n){
        init();
        return tempSet.contains(getNum(n));
    }

    public void init(){
        for (int i = 1; i <1e9 ; i<<=1) {
            tempSet.add(getNum(i));
        }
    }

    public String getNum(int n){
        char[] num=new char[9];
        while (n>0){
            ++num[n%10];
            n/=10;
        }
        return new String(num);
    }
}
